﻿<controls:AlternativePage
    x:Name="pageRoot"
    x:Class="F2S.LINQ2LinkedIn.Client.Views.MainView"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:F2S.LINQ2LinkedIn.Client.Views"
    xmlns:common="using:F2S.LINQ2LinkedIn.Client.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:WinRTXamlToolkit.Controls"
    xmlns:triggers="using:WinRT.Triggers"
    xmlns:cm="using:Caliburn.Micro"
    xmlns:interop="using:Windows.UI.Xaml.Interop"
    xmlns:selectors="using:F2S.LINQ2LinkedIn.Client.Selectors"
    xmlns:interactivity="using:WinRtBehaviors"
    xmlns:behaviors="using:F2S.LINQ2LinkedIn.Client.Behaviors"
    mc:Ignorable="d">
    
    <interactivity:Interaction.Behaviors>
        <behaviors:DataStateBehavior TrueState="LoggedIn" FalseState="NotLoggedIn" Value="True" BindingName="LoggedIn"/>
    </interactivity:Interaction.Behaviors>

    <Grid>
        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>
        
        <Grid.Resources>
            <!--
            <ControlTemplate x:Key="t1">
                <Grid x:Name="grid" Loaded="Grid_OnLoaded">
                    <ContentControl x:Name="cc"></ContentControl>
                </Grid>
                <triggers:Interactions.Triggers>
                    <triggers:PropertySetTrigger Binding="{Binding LoggedIn}" RequiredValue="True" >
                    <triggers:SetPropertyAction Target="{Binding}" PropertyName="Test" Value="1"></triggers:SetPropertyAction>
                        <triggers:SetPropertyAction Target="{Binding ElementName=cc}" PropertyName="ContentTemplate" Value="{StaticResource LoggedInTemplate}"></triggers:SetPropertyAction>
                    </triggers:PropertySetTrigger>
                </triggers:Interactions.Triggers>
            </ControlTemplate>
            -->
            
            <selectors:MainPageDataTemplateSelector x:Key="mainContentSelector" />
        </Grid.Resources>

        <ContentControl x:Name="ActiveItem" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" >
            <ContentControl.Resources>
            </ContentControl.Resources>
            
            <ContentControl.ContentTransitions>
                <TransitionCollection>
                    <ContentThemeTransition HorizontalOffset="200"></ContentThemeTransition>
                </TransitionCollection>
            </ContentControl.ContentTransitions>
        </ContentControl>
    </Grid>

</controls:AlternativePage>
